package com.example.service;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;


@AiService(wiringMode = AiServiceWiringMode.EXPLICIT,
chatModel = "openAiChatModel",
streamingChatModel = "openAiStreamingChatModel",
chatMemoryProvider = "chatMemoryProvider",
contentRetriever = "contentRetriever")
public interface StreamConsultService {

    @SystemMessage(fromResource = "system.txt")
    Flux<String> chat(String message);

    @SystemMessage(fromResource = "system.txt")
    Flux<String> chatInMemory(@MemoryId String memoryId,@UserMessage String message);
}
